/*
 * StateManager.h
 *
 *  Created on: 29-06-2013
 *      Author: Jarek
 */

#ifndef STATEMANAGER_H_
#define STATEMANAGER_H_

#include "ETime.h"
#include "State.h"
#include "Stack.h"

#define STACK_SIZE	32

class StateManager : public State
{
private:
	Stack<State*> 	states;
	STATE_TYPE 		nextState;


private:
	void				changeState();

public:
	StateManager();
	virtual ~StateManager();

	virtual bool 		onInitialize();
	virtual void 		onDestroy ();
	virtual void 		onRun (const Time& time);
	virtual void 		onDraw (const Time& time);
	virtual bool 		handleInput (const Time& time/*, const Input& input*/);

	void				changeState(STATE_TYPE nextState);
};

#endif /* STATEMANAGER_H_ */
